/* 状态图例组件样式 */
.statusLegend {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid #e8e8e8;
  overflow: hidden;
  animation: legendSlideIn 0.3s ease;
}

@keyframes legendSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 紧凑模式 */
.compactLegend {
  display: inline-block;
}

.expandButton {
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.expandButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

/* 图例头部 */
.legendHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.legendTitle {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.legendActions {
  display: flex;
  gap: 8px;
}

.collapseButton,
.clearButton {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.collapseButton:hover,
.clearButton:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 分类标签页 */
.categoryTabs {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.categoryTabs::-webkit-scrollbar {
  display: none;
}

.categoryTab {
  padding: 12px 16px;
  background: none;
  border: none;
  color: #6c757d;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.categoryTab:hover {
  background: #e9ecef;
  color: #495057;
}

.categoryTab.active {
  background: white;
  color: #212529;
  font-weight: 600;
  border-bottom: 3px solid #667eea;
}

.selectionBadge {
  background: #dc3545;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  line-height: 1.2;
}

/* 状态容器 */
.statusContainer {
  max-height: 400px;
  overflow-y: auto;
  padding: 16px;
}

/* 分类区域 */
.categorySection {
  margin-bottom: 20px;
}

.categorySection:last-child {
  margin-bottom: 0;
}

.categoryHeader {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9ecef;
}

/* 状态网格 */
.statusGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

/* 状态项 */
.statusItem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  background: white;
}

.statusItem:hover {
  border-color: #667eea;
  background: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.statusItem.selected {
  border-color: #28a745;
  background: #f8fff9;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.statusIndicator {
  flex-shrink: 0;
}

.statusCount {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  margin-left: auto;
  background: #f8f9fa;
  padding: 2px 8px;
  border-radius: 12px;
  min-width: 24px;
  text-align: center;
}

.statusItem.selected .statusCount {
  background: #28a745;
  color: white;
}

.selectedMark {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #28a745;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 筛选统计 */
.filterSummary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #cfe2ff;
  border-top: 1px solid #b6d7ff;
  color: #0a58ca;
}

.filterText {
  font-size: 13px;
  font-weight: 500;
}

.clearFiltersButton {
  background: #0d6efd;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clearFiltersButton:hover {
  background: #0b5ed7;
  transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .statusGrid {
    grid-template-columns: 1fr;
  }

  .categoryTabs {
    padding: 0 8px;
  }

  .categoryTab {
    padding: 10px 12px;
    font-size: 12px;
  }

  .statusItem {
    padding: 6px 10px;
  }

  .statusContainer {
    padding: 12px;
    max-height: 300px;
  }

  .legendHeader {
    padding: 12px 16px;
  }

  .legendTitle {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .statusGrid {
    gap: 6px;
  }

  .statusItem {
    gap: 6px;
    padding: 6px 8px;
  }

  .statusCount {
    font-size: 11px;
    padding: 1px 6px;
  }

  .categoryTab {
    padding: 8px 10px;
    font-size: 11px;
  }

  .filterSummary {
    padding: 8px 16px;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* 滚动条样式 */
.statusContainer::-webkit-scrollbar {
  width: 6px;
}

.statusContainer::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.statusContainer::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.statusContainer::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 加载动画 */
.statusItem {
  animation: statusItemFadeIn 0.3s ease;
}

@keyframes statusItemFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  .statusItem {
    border-width: 3px;
  }

  .statusItem.selected {
    border-width: 4px;
  }

  .selectedMark {
    border: 2px solid white;
  }
}
